Lars Ingebrigtsen [Fri, 30 Jul 2021 16:25:12 +0000 (18:25 +0200)]
Allow nil initializers in define-minor-mode
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Make the
meaning of :initialize nil and a missing :initialize the same.
Alan Third [Wed, 23 Jun 2021 15:07:12 +0000 (16:07 +0100)]
Fix some macOS problems
* src/nsmenu.m (update_frame_tool_bar): Make sure the toolbar isn't
displayed when it's not supposed to be.
* src/nsterm.m ([EmacsView layoutSublayersOfLayer:]): Reinstate code
intended to prevent a crash when running redisplay.
Alan Third [Sat, 12 Jun 2021 18:04:02 +0000 (19:04 +0100)]
Move parent frame setting code into EmacsWindow
* src/nsterm.m (ns_make_frame_visible):
(ns_set_parent_frame):
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Use new method.
([EmacsWindow setParentChildRelationships]): New method.
Alan Third [Sat, 12 Jun 2021 11:52:15 +0000 (12:52 +0100)]
Move NS port toolbar handling to the window
* src/nsmenu.m (free_frame_tool_bar):
(update_frame_tool_bar): Remove wait_for_tool_bar and get the toolbar
from the window.
* src/nsterm.h (EmacsView): Remove toolbar and wait_for_tool_bar.
* src/nsterm.m (ns_update_begin):
([EmacsView windowDidEnterFullScreen]):
([EmacsView windowDidExitFullScreen]): Get the toolbar from the
window, not the view.
([EmacsView dealloc]): Remove toolbar from view.
([EmacsView createToolbar:]): Move method to EmacsWindow.
([EmacsView initFrameFromEmacs:]): Don't create toolbar here any more.
([EmacsView toolbar]): Remove method.
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Create toolbar here.
([EmacsWindow createToolbar:]): Moved from EmacsView.
([EmacsWindow dealloc]): Make sure we clean up the toolbar after
closing the window.
Alan Third [Sat, 12 Jun 2021 09:25:47 +0000 (10:25 +0100)]
Fix macOS live resize drawing
* src/nsterm.m ([EmacsView layout]):
([EmacsView layoutSublayersOfLayer:]): Rename layout to
layoutSublayersOfLayer.
Alan Third [Wed, 9 Jun 2021 16:57:00 +0000 (17:57 +0100)]
Change NS port resize detection
* src/nsterm.m ([EmacsView windowDidResize:]): Remove function, it's
not performing a useful function any more.
([EmacsView viewDidResize]):
([EmacsView resizeWithOldSuperviewSize:]): Replace viewDidResize with
resizeWithOldSuperviewSize.
([EmacsView initFrameFromEmacs:]): Remove the view resize notification
as we don't need it any more.
Alan Third [Sat, 5 Jun 2021 11:39:46 +0000 (12:39 +0100)]
Tidy up NS port OS window handling
* src/nsterm.h (EmacsWindow): Move above EmacsView definition and add
new method definitions.
(EmacsView): Remove redundant bwidth variable, and change NSWindow to
EmacsWindow.
(EmacsFSWindow): Delete definition.
* src/nsterm.m (ns_set_undecorated): Rewrite to work in GNUstep using
the new OS window creating methods.
([EmacsView initFrameFromEmacs:]): Move all NSWindow related code to
new init method in EmacsWindow, and use said method.
([EmacsView toggleFullScreen:]): Use EmacsWindow instead of NSWindow.
([EmacsWindow initWithEmacsFrame:]):
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
([EmacsWindow borderWidth]): New methods.
(EmacsFSWindow): Remove implementation.
Alan Third [Sat, 29 May 2021 08:48:51 +0000 (09:48 +0100)]
Simplify macOS drawing code
Convert EmacsSurface into a CALayer subclass so we can use the
built-in relationships. Also simplify the macOS versioning code.
This will result in more warnings on older versions of macOS but makes
reading the code easier.
* configure.ac: Add QuartzCore framework.
* src/nsterm.h (NS_DRAW_TO_BUFFER): Remove define and all references.
(EmacsSurface, EmacsLayer): Rename EmacsSurface to EmacsLayer and
modify the definition to fit the new function.
* src/nsterm.m (ns_update_begin):
(ns_update_end):
(ns_focus):
(ns_unfocus): Use the new overridden lockFocus and unlockFocus and
simplify the frame management.
([EmacsView dealloc]):
([EmacsView viewDidResize:]):Don't explicitly release surfaces.
([EmacsView initFrameFromEmacs:]): Move the layer code to after the
NSWindow has been created as creating the layer now relies on some of
it's properties.
([EmacsView makeBackingLayer]): New function.
([EmacsView lockFocus]):
([EmacsView focusOnDrawingBuffer]): Rename to lockFocus.
([EmacsView unlockFocus]):
([EmacsView unfocusDrawingBuffer]): Rename to unlockFocus.
([EmacsView windowDidChangeBackingProperties]): Don't explicitly
release surfaces but reset EmacsLayer properties.
([EmacsView layout]):
([EmacsView viewWillDraw]): Rename to layout.
([EmacsView wantsUpdateLayer]): Remove function and change all callers
to [EmacsView wantsLayer].
(EmacsSurface, EmacsLayer): Rename to EmacsLayer.
([EmacsSurface getSize]):
([EmacsSurface initWithSize:ColorSpace:Scale:]): Remove methods.
([EmacsSurface initWithColorSpace:]):
([EmacsLayer checkDimensions]):
([EmacsLayer releaseSurfaces]):
([EmacsLayer display]): New functions.
* src/nsterm.m ([EmacsLayer dealloc]): Use releaseSurfaces.
([EmacsSurface getContext]): Automatically detect frame property
changes and clear the cache if required. Use built-in CALayer
properties where available.
([EmacsLayer copyContentsTo:]): Use [CALayer contents] as source.
Eli Zaretskii [Sat, 31 Jul 2021 06:28:36 +0000 (09:28 +0300)]
* src/fontset.c (check_fontset_name): A better fix for bug#49782.
Adam Porter [Mon, 9 Mar 2020 18:01:32 +0000 (13:01 -0500)]
* lisp/emacs-lisp/cl-macs.el: Add cl-type pattern
* lisp/emacs-lisp/cl-macs.el:
((pcase-defmacro type)): Add 'cl-type' pattern.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-cl-type): Add test.
* doc/lispref/control.texi (pcase Macro): Update manual.
With thanks to Stefan Monnier and Eli Zaretskii for their guidance.
Eli Zaretskii [Fri, 30 Jul 2021 18:51:59 +0000 (21:51 +0300)]
* src/fontset.c (check_fontset_name): Fix last change.
Eli Zaretskii [Fri, 30 Jul 2021 18:17:58 +0000 (21:17 +0300)]
Avoid segfault when set-fontset-font is called from non-GUI frames
* src/fontset.c (check_fontset_name): Avoid crashes if this is
called from a non-GUI frame. (Bug#49782)
Michael Albinus [Fri, 30 Jul 2021 15:19:29 +0000 (17:19 +0200)]
Change Tramp version to "2.5.2-pre"
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.5.2-pre".
Stephen Gildea [Fri, 30 Jul 2021 13:32:41 +0000 (06:32 -0700)]
; fix 2 typos in MH-E comments
* lisp/mh-e/ChangeLog.1: fix typo
* lisp/mh-e/mh-junk.el (mh-junk-allowlist): fix verb tense
Dmitry Gutov [Fri, 30 Jul 2021 12:58:25 +0000 (14:58 +0200)]
Make fileloop skip missing files
* lisp/fileloop.el (fileloop-next-file): If a file doesn't exist,
skip to the next one (bug#44979).
Maxim Nikulin [Fri, 30 Jul 2021 12:42:07 +0000 (14:42 +0200)]
Tweak previous mailcap-view-file change
* lisp/net/mailcap.el (mailcap-view-file): Remove the :noquery t
mistakenly added (bug#12972).
Copyright-paperwork-exempt: yes
k3tu0isui [Fri, 30 Jul 2021 12:39:13 +0000 (14:39 +0200)]
Fix problem when switching between different prolog versions
* lisp/progmodes/prolog.el (run-prolog): Make switching between
different prolog systems work more reliably (bug#45795).
* lisp/progmodes/prolog.el (prolog-ensure-process): Don't start a
new process if one already exists.
Copyright-paperwork-exempt: yes
Mattias Engdegård [Fri, 30 Jul 2021 10:22:01 +0000 (12:22 +0200)]
Simplify lexical let-optimisations
Ensure in cconv that let-bindings have the normal form (VAR EXPR)
where VAR is a valid variable name, so that we don't need to keep
re-checking this all the time in the optimiser.
* lisp/emacs-lisp/byte-opt.el
(byte-optimize-enable-variable-constprop)
(byte-optimize-warn-eliminated-variable): Remove; these were mainly
used for debugging.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form):
Assume normalised let-bindings (with lexical-binding).
Stop using the variables removed above.
* lisp/emacs-lisp/cconv.el (cconv-convert): Ensure normalised
let-bindings. Malformed bindings are dropped after warning.
remove byte-optimize-warn-eliminated-variable
Lars Ingebrigtsen [Fri, 30 Jul 2021 12:07:04 +0000 (14:07 +0200)]
Ensure that recover-file doesn't leave stale auto-save files behind
* lisp/files.el (recover-file): Don't leave stale auto-save files
behind after crash recovery (bug#11331).
Lars Ingebrigtsen [Fri, 30 Jul 2021 12:03:43 +0000 (14:03 +0200)]
Allow shell PROMPT strings to have ANSI codes
* lisp/comint.el (comint-output-filter): Don't overwrite ANSI
codes from the prompt command (bug#11883).
Max Nikulin [Fri, 30 Jul 2021 12:00:41 +0000 (14:00 +0200)]
mailcap.el: Avoid xdg-open silent failure
* lisp/net/mailcap.el (mailcap-view-file): Use 'pipe :connection-type
instead of 'pty to prevent killing of background process on handler
exit. Avoid regression similar to Bug#44824.
Problem happens only in some desktop environments where mailcap handler
launches actual viewer (as defined in .desktop files and obtained from
mimeapps.list) in background. E.g. xdg-open invokes "gio open" or
kde-open5 for Gnome or KDE accordingly and these handlers launch e.g.
eog or okular in background. As soon as main process exits, temporary
terminal session created by `start-process-shell-command' is terminated.
As a result background processes receive SIGHUP.
Previously command were executed with no buffer as well, so the change
does not affect "needsterminal" and "copiousoutput" mailcap features,
they are not supported as earlier.
If main process of the handler fails then show a message with exit
reason. Output (including error messages) is ignored as before.
Gtk applications tend to report significant amount of failed asserts
hardly informative for majority of users (bug#12972).
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Fri, 30 Jul 2021 11:51:46 +0000 (13:51 +0200)]
Fix case insensitivity in `read-file-name'
* lisp/minibuffer.el (read-file-name-default): Make `read-file-name'
actually respect `read-file-name-completion-ignore-case' (bug#14340).
Lars Ingebrigtsen [Fri, 30 Jul 2021 11:32:54 +0000 (13:32 +0200)]
Fix issue with mml-preview from outside Gnus
* lisp/gnus/gnus-art.el (gnus-mime-display-alternative): Be more
resilient when running from outside Gnus.
Lars Ingebrigtsen [Fri, 30 Jul 2021 11:13:46 +0000 (13:13 +0200)]
Work around long-standing seq.el compilation warning
* lisp/emacs-lisp/seq.el (seq-contains): When using cl-defgeneric
to define an obsolete function, it'll complain about it being
obsolete. Suppress that warning. (Should probably be fixed in
cl-defgeneric instead.)
Basil L. Contovounesios [Fri, 30 Jul 2021 10:30:53 +0000 (11:30 +0100)]
Remove a redundant let-binding from Ispell
Recent optimizer changes revealed a case-fold-search binding in
Ispell that was made redundant in the revision of 2020-11-03
"Simplify ispell-check-version’s use of -vv flag".
* lisp/textmodes/ispell.el (ispell-check-version): Remove no-op
binding of case-fold-search.
Michael Albinus [Fri, 30 Jul 2021 09:57:50 +0000 (11:57 +0200)]
* etc/NEWS: Tramp supports authentication via yubikey now. Fix typos.
Michael Albinus [Fri, 30 Jul 2021 09:57:39 +0000 (11:57 +0200)]
Fix bug#49773 in Tramp
* lisp/net/tramp.el (tramp-handle-find-backup-file-name)
(tramp-handle-lock-file, tramp-handle-make-auto-save-file-name):
Check security hole only if action is in progress. (Bug#49773)
Mattias Engdegård [Thu, 29 Jul 2021 13:35:55 +0000 (15:35 +0200)]
Optimise let and let* whose body is constant or the last variable
Simplify (let ((X1 E1) ... (Xn En)) Xn)
=> (progn E1 ... En)
and (let* ((X1 E1) ... (Xn En)) Xn)
=> (let* ((X1 E1) ... (Xn-1 En-1)) En)
and similarly the case where the body is a constant, extending a
previous optimisation that only applied to the constant nil.
This reduces the number of bound variables, shortens the code, and
enables further optimisations.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-letX): Rewrite using
`pcase` and add the aforementioned transformations.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
Mattias Engdegård [Thu, 29 Jul 2021 15:20:41 +0000 (17:20 +0200)]
Move warnings about bad let-bindings from source optimiser to cconv
* lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form): Move warnings...
* lisp/emacs-lisp/cconv.el (cconv-convert): ...here, which is an
overall better place (closer to the front-end).
Mattias Engdegård [Thu, 29 Jul 2021 08:07:26 +0000 (10:07 +0200)]
Optimise prog1 better
Rewrite (prog1 CONST FORMS...) => (progn FORMS... CONST)
where CONST is a compile-time constant, because putting the value last
allows the lapcode peephole pass to do important improvements like
branch elimination. Also use progn instead of prog1 for `ignore`.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
New `prog1` and `ignore` transforms.
Mattias Engdegård [Wed, 28 Jul 2021 15:31:44 +0000 (17:31 +0200)]
Elide lexical variables in for-effect context in source optimiser
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Remove for-effect uses of lexical variables. We previously relied on
this being done by the lapcode peephole optimiser but at source level
it enables more optimisation opportunities.
Keywords are elided for the same reason.
Mattias Engdegård [Wed, 28 Jul 2021 19:12:27 +0000 (21:12 +0200)]
Single source optimiser entry point
Make the optimiser aware of lexical arguments. Otherwise we cannot
know for sure whether a variable is lexical or dynamic during
traversal.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-one-form): New optimiser
entry point, replacing the recursive byte-optimize-form.
* lisp/emacs-lisp/bytecomp.el (byte-optimize-one-form): Autoload.
(byte-compile-keep-pending, byte-compile-top-level):
Use byte-optimize-one-form.
Stephen Gildea [Fri, 30 Jul 2021 00:37:39 +0000 (17:37 -0700)]
mh-junk: replace color-based terms with descriptive words
* lisp/mh-e/*.el: "whitelist" -> "allowlist" and "blacklist" -> "blocklist".
* doc/misc/mh-e.texi: update manual to match.
* lisp/mh-e/folder.el: Change the binding of 'mh-junk-allowlist' to 'J a'.
Add a compatibility binding for the old 'J w'.
* lisp/mh-e/mh-scan.el (mh-note-allowlisted): Change char from 'W' to 'A'.
* lisp/mh-e/junk.el: Rename 'mh-blacklist-a-msg' to 'mh-junk-blocklist-a-msg',
adding the missing "junk-" to the function name.
Nick Gasson [Thu, 29 Jul 2021 13:24:13 +0000 (21:24 +0800)]
Avoid errors in rmailsum for messages without "From"
* lisp/mail/rmailsum.el (rmail-header-summary): Be defensive about
the presence of the "From" header. (Bug#49770)
Copyright-paperwork-exempt: yes
dickmao [Thu, 29 Jul 2021 11:33:08 +0000 (13:33 +0200)]
Follow-up toggle-subscription name change
* doc/misc/gnus.texi (Subscription Commands): Refer to correct function.
* lisp/gnus/gnus-group.el (gnus-group-unsubscribe-current-group):
Make backwards-compatible.
(gnus-group-unsubscribe-group):
Make backwards-compatible (bug#49768).
Dmitry Gutov [Thu, 29 Jul 2021 01:57:05 +0000 (04:57 +0300)]
Fix printing of multiple items in one group without line numbers
* lisp/progmodes/xref.el (xref--insert-xrefs):
Fix printing of multiple items in one group without line numbers
(mentioned in bug#49731).
dickmao [Wed, 28 Jul 2021 18:52:51 +0000 (20:52 +0200)]
Rename Gnus -unsubscribe-group commands to -toggle-subscription
* doc/emacs/misc.texi (Gnus Group Buffer): Document change.
* doc/misc/gnus.texi (Subscription Commands): Document change.
(Browse Foreign Server): Document change.
* lisp/gnus/gnus-group.el (gnus-group-mode-map):
Unsubscribe is not subscribe.
(gnus-group-sub-map): Unsubscribe is not subscribe.
(gnus-group-make-menu-bar): Unsubscribe is not subscribe.
(gnus-group-tool-bar-gnome): Unsubscribe is not subscribe.
(gnus-group-mode): Unsubscribe is not subscribe.
(gnus-group-unsubscribe): Refactor.
(gnus-group-subscribe): Refactor.
(gnus-group-unsubscribe-current-group): Define obsolete alias.
(gnus-group-unsubscribe-group): Define obsolete alias.
(gnus-group-toggle-subscription-at-point): Refactor.
(gnus-group-set-subscription-at-point): Refactor.
(gnus-group-toggle-subscription): Refactor.
(gnus-group-set-subscription): Refactor.
* lisp/gnus/gnus-srvr.el (gnus-browse-mode-map):
Unsubscribe is not subscribe.
(gnus-browse-make-menu-bar): Unsubscribe is not subscribe.
(gnus-browse-mode): Document the change.
(gnus-browse-unsubscribe-current-group): Define obsolete alias.
(gnus-browse-unsubscribe-group): Define obsolete alias.
(gnus-browse-toggle-subscription-at-point): Unsubscribe is not subscribe.
(gnus-browse-toggle-subscription): Unsubscribe is not subscribe
(bug#49759).
Lars Ingebrigtsen [Wed, 28 Jul 2021 16:39:39 +0000 (18:39 +0200)]
Improve mode-line-position-column-format manual entry
* doc/lispref/modes.texi (Mode Line Variables): Mention %C, and
don't mention the obsolete column-number-indicator-zero-based
variable.
Juri Linkov [Wed, 28 Jul 2021 16:22:53 +0000 (19:22 +0300)]
* lisp/progmodes/gud.el: Add prefix 'gud-' to repeat-map variables (bug#49632)
* lisp/progmodes/gud.el (gud-sdb-repeat-map, gud-dbx-repeat-map)
(gud-xdb-repeat-map, gud-perldb-repeat-map, gud-pdb-repeat-map)
(gud-guiler-repeat-map, gud-jdb-repeat-map): Rename with prefix 'gud-'.
Lars Ingebrigtsen [Wed, 28 Jul 2021 16:10:59 +0000 (18:10 +0200)]
Make byte-recompile-directory less brittle
* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Don't
interpret files named "~" as $HOME (bug#49758).
Lars Ingebrigtsen [Wed, 28 Jul 2021 15:57:19 +0000 (17:57 +0200)]
Improve mode-line-position-column-format doc string
* lisp/bindings.el (mode-line-position-column-format): Improve doc
string.
(mode-line-position-line-format): Point to
`mode-line-position-column-line-format'.
Kévin Le Gouguec [Wed, 28 Jul 2021 15:38:41 +0000 (17:38 +0200)]
Improve file-name-concat NEWS entry
Michael Albinus [Wed, 28 Jul 2021 07:06:37 +0000 (09:06 +0200)]
Display yubikey message properly in Tramp
* lisp/net/tramp.el (tramp-action-show-and-confirm-message):
Display message properly.
Brian Leung [Tue, 20 Jul 2021 07:32:34 +0000 (00:32 -0700)]
Ensure that gud commands for non-GDB debuggers are handled by repeat-mode
* lisp/progmodes/gud.el (sdb-repeat-map): Define.
(sdb): Set repeat-mode property to the symbol corresponding to the
repeat map.
(dbx-repeat-map): Define.
(dbx): Set repeat-mode property to the symbol corresponding to the
repeat map.
(xdb-repeat-map): Define.
(xdb): Set repeat-mode property to the symbol corresponding to the
repeat map.
(perldb-repeat-map): Define.
(perldb): Set repeat-mode property to the symbol corresponding to the
repeat map.
(pdb-repeat-map): Define.
(pdb): Set repeat-mode property to the symbol corresponding to the
repeat map.
(guiler-repeat-map): Define.
(guiler): Set repeat-mode property to the symbol corresponding to the
repeat map.
(jdb-repeat-map): Define.
(jdb): Set repeat-mode property to the symbol corresponding to the
repeat map. (Bug#49632)
Brian Leung [Tue, 20 Jul 2021 06:41:01 +0000 (23:41 -0700)]
Ensure that gud commands for M-x gdb are handled by repeat-mode
* lisp/progmodes/gud.el (gud-gdb-repeat-map): Rename from
gud-repeat-map, and populate at the top-level.
(gud-set-repeat-map-property): Introduce this helper function for
setting the repeat-map property.
(gud-gdb): Use the gud-set-repeat-map-property function to assign the
repeat-map property.
* lisp/progmodes/gdb-mi.el (gdb): Use the gud-set-repeat-map-property
function to assign the repeat-map property.
Because different debugging tools may not support all of the gud-foo
functions, we reassign the repeat-map property within the respective
commands, as opposed to the top level of the files, to ensure that the
repeat-map property is reassigned each time to a symbol corresponding
to the active debugging tool. (Bug#49632)
Juri Linkov [Tue, 27 Jul 2021 20:55:32 +0000 (23:55 +0300)]
* lisp/tab-bar.el (tab-bar-format-global): Use string-trim-right (bug#30056).
Mattias Engdegård [Tue, 27 Jul 2021 18:29:40 +0000 (20:29 +0200)]
; * lisp/completion.el (load-completions-from-file): Simplify
Use a condition-case :success clause instead flags for control.
Michael Albinus [Tue, 27 Jul 2021 17:41:57 +0000 (19:41 +0200)]
Mark all autorevert tests as unstable on Cygwin (bug#49665)
* test/lisp/autorevert-tests.el: Mark all tests as unstable on
Cygwin (bug#49665).
Mattias Engdegård [Tue, 27 Jul 2021 15:26:26 +0000 (17:26 +0200)]
Fix mistake in switch-case generation of `null` (bug#49746)
Reported by Gregor Zattler.
* lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix):
Be more careful in the selection of equality.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.
Lars Ingebrigtsen [Tue, 27 Jul 2021 15:23:32 +0000 (17:23 +0200)]
Revert "Make revert-buffer preserve buffer-readedness"
This reverts commit
fcae435f598471a2911641412125c5ac4f73559f.
This leads to problems when reverting from a file that's changed
readedness externally.
Michael Albinus [Tue, 27 Jul 2021 11:08:36 +0000 (13:08 +0200)]
; Fix last change in tramp.el
Michael Albinus [Tue, 27 Jul 2021 07:28:28 +0000 (09:28 +0200)]
Final tweak for Tramp's yubikey detection
* lisp/net/tramp.el (tramp-yubikey-regexp)
(tramp-action-show-and-confirm-message): Expect also "\n".
Alan Third [Sat, 24 Jul 2021 15:08:09 +0000 (16:08 +0100)]
Convert fringe bitmaps to vectors on NS port
Unfortunately *step doesn't support masks for bitmap images so
changing the colors of fringe bitmaps is awkward. We can work around
this by converting the bitmap into an NSBezierPath and drawing it in
the required color.
* src/nsterm.m (ns_define_fringe_bitmap):
(ns_destroy_fringe_bitmap): New functions
(ns_draw_fringe_bitmap): Display the NSBezierPath.
* src/nsimage.m
([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]): Remove
variable that's there to allow us to easily modify the XBM colors.
([EmacsImage setXBMColor:]): Remove method.
Alan Third [Sat, 17 Jul 2021 12:04:58 +0000 (13:04 +0100)]
Fix NS inset rectangle corners
* src/nsterm.m (ns_draw_relief): Use a path to draw the mitered
corners instead of rectangles.
Alan Third [Sat, 17 Jul 2021 10:23:42 +0000 (11:23 +0100)]
Simplify NS sizing and positioning code
* src/nsterm.m (ns_set_offset): Unify the two branches into one, most
of the code is the same.
(ns_set_window_size): Use the provided tools to calculate the window
size instead of doing it ourselves.
Alan Third [Sat, 10 Jul 2021 14:47:00 +0000 (15:47 +0100)]
* src/nsterm.m (ns_set_frame_alpha): Enable alpha on GNUstep.
Alan Third [Sat, 24 Jul 2021 11:44:19 +0000 (12:44 +0100)]
Fix image crash on macOS (bug#49688)
* src/nsimage.m ([EmacsImage allocInitFromFile:]): Use isValid to
check whether the image is valid instead of generating a tiff.
Mattias Engdegård [Mon, 26 Jul 2021 19:18:42 +0000 (21:18 +0200)]
Adjust grep-mode end-col function return value
* lisp/progmodes/grep.el (grep-regexp-alist): Adjust the return value
from the END-COL function by one since it is now (after fixing
bug#49624) inclusive. Found by Juri Linkov.
Michael Albinus [Mon, 26 Jul 2021 18:51:57 +0000 (20:51 +0200)]
Some minor improvements for share handling in tramp-gvfs.el
* lisp/net/tramp-gvfs.el (tramp-gvfs-connection-mounted-p):
Set "share" connection property if the mount spec offers it.
(tramp-gvfs-handle-get-remote-uid)
(tramp-gvfs-handle-get-remote-gid): Use it.
Michael Albinus [Mon, 26 Jul 2021 13:44:32 +0000 (15:44 +0200)]
Adapt Tramp for yubikey
* lisp/net/tramp.el (tramp-yubikey-regexp): Adapt value.
(tramp-trace-functions): Adapt docstring.
(tramp-process-action-regexp): New defvar.
(tramp-action-password, tramp-process-one-action): Use it.
(tramp-action-show-and-confirm-message): Rewrite.
Michael Albinus [Mon, 26 Jul 2021 07:55:30 +0000 (09:55 +0200)]
Adapt tramp-sudoedit.el for better testing
* doc/misc/tramp.texi (Bug Reports): Revert last change. Mention
exception for sudoedit.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command):
Let-bind `tramp-cache-read-persistent-data' for better password handling.
Mattias Engdegård [Mon, 26 Jul 2021 07:15:04 +0000 (09:15 +0200)]
; * lisp/replace.el (occur-after-change-function): Fix logic mistake
Mattias Engdegård [Sun, 25 Jul 2021 19:39:39 +0000 (21:39 +0200)]
Describe changes to the occur-mode implementation in NEWS
* etc/NEWS: Mention change to the `occur-target` property (bug#39121).
Glenn Morris [Sun, 25 Jul 2021 16:44:37 +0000 (09:44 -0700)]
Fix recent gdb-mi change
* lisp/progmodes/gdb-mi.el (gdb-registers-filter-pattern-list):
Fix type.
Glenn Morris [Sun, 25 Jul 2021 14:57:23 +0000 (07:57 -0700)]
Merge from origin/emacs-27
d0625dc553 (origin/emacs-27) ; One more change in back.texi.
06d0a66e57 ; Yet another last-minute change in Emacs manual for printing
Michael Albinus [Sun, 25 Jul 2021 14:54:00 +0000 (16:54 +0200)]
Add instructions for Tramp bug reports
* doc/misc/tramp.texi (Bug Reports): Describe how to use password
cache with "emacs -Q".
Mattias Engdegård [Sun, 25 Jul 2021 11:04:43 +0000 (13:04 +0200)]
Fix tex-validate-buffer
* lisp/textmodes/tex-mode.el (tex-validate-buffer):
Set `inhibit-read-only` around all modifications of the
read-protected *Occur* buffer (bug#19326).
Add the `occur-match` property, and adjust the extent of the
`occur-target` property, so that next-error and previous-error work
correctly (bug#39121).
Mattias Engdegård [Sun, 25 Jul 2021 13:55:50 +0000 (15:55 +0200)]
Add back occur-mode-find-occurrence for compatibility (bug#39121)
* lisp/replace.el (occur-mode-find-occurrence):
Put back (an emulation of) the previously removed function.
It is used internally in eshell and in some external code.
Problem found by Basil Contovounesios.
Eli Zaretskii [Sun, 25 Jul 2021 12:50:46 +0000 (15:50 +0300)]
Fix compilation of xftfont.c with old fontconfig
* src/xftfont.c (FC_LCD_FILTER): Define if undefined, for older
versions of fontconfig. This was mistakenly deleted 2 years ago.
(Bug#49722)
Michael Albinus [Sun, 25 Jul 2021 12:14:49 +0000 (14:14 +0200)]
Fix extended attributes for Tramp's sudoedit method (bug#49724)
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Remove compat code for `{set-}file-extended-attributes'.
(tramp-sudoedit-handle-write-region): Handle extended attributes.
(Bug#49724)
* test/lisp/net/tramp-tests.el (tramp-test25-file-selinux):
Fix test for sudoedit method.
Kévin Le Gouguec [Sun, 25 Jul 2021 10:23:28 +0000 (12:23 +0200)]
* etc/NEWS: Fix renaming of directory-append.
Christopher League [Sun, 25 Jul 2021 07:37:36 +0000 (09:37 +0200)]
When bookmark is overwritten, unfontify its previous position
* lisp/bookmark.el (bookmark-store): When the bookmark-fontify option
is non-nil, setting or jumping to bookmarks will colorize them using
`bookmark-face'. With this change, overwriting a bookmark will remove
the fontification at its former position (bug#49725).
Michael Albinus [Sun, 25 Jul 2021 10:05:01 +0000 (12:05 +0200)]
Use `file-name-concat' in Tramp
* lisp/net/tramp-compat.el (tramp-compat-file-name-concat):
New defalias.
* lisp/net/tramp.el (tramp-handle-expand-file-name):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
* lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Use it.
Mattias Engdegård [Sun, 25 Jul 2021 09:24:53 +0000 (11:24 +0200)]
Don't squash markers in occur-edit-mode
* lisp/replace.el (occur-after-change-function): Instead of replacing
the whole line being edited, use shrink-wrapping to replace the
smallest interval encompassing the change. That way, we avoid
disturbing markers (such as occur highlighting locations) in the line;
they would otherwise all be forced to the beginning.
Mattias Engdegård [Sat, 24 Jul 2021 14:32:11 +0000 (16:32 +0200)]
Keep track of match extents in occur-mode (bug#39121)
Use the `occur-target` text property to keep track of the extents of
all matches on each line instead of just the start of the first match.
Doing so allows us to highlight all matches when jumping to a matching
line instead of just the first one, and it works in a more principled
way. It also removes compatibility problems that were introduced with
occur-highlight-regexp.
For compatibility with code that populate their own occur-mode
buffers, we still accept `occur-target` properties with a single
marker as value.
* lisp/replace.el (occur-highlight-regexp, occur-highlight-overlay):
Remove.
(occur-highlight-overlays): New.
(occur--targets-start): New.
* lisp/replace.el (occur-after-change-function):
(occur-mode-find-occurrence): Replace with...
(occur-mode--find-occurrences): ...this function that returns the
whole `occur-target` property value.
(occur-mode-goto-occurrence, occur-mode-goto-occurrence-other-window)
(occur-goto-locus-delete-o, occur-mode-display-occurrence)
(occur-engine): Adjust to new property format.
(occur--highlight-occurrence): Replace with...
(occur--highlight-occurrences): ...this function that takes
the `occur-target` property value as argument.
(occur-1): Don't use `occur-highlight-regexp`.
* test/lisp/replace-tests.el (occur-highlight-occurrence):
Adapt to new property format.
Arthur Miller [Sat, 24 Jul 2021 14:58:08 +0000 (16:58 +0200)]
Support '--group-directories-first' in ls-lisp.el
* lisp/ls-lisp.el (ls-lisp--sanitize-switches): New function.
(ls-lisp--insert-directory): Support '--group-directories-first'.
Call 'ls-lisp--sanitize-switches' to convert long options to short
forms and remove unsupported long options. Update the doc string.
Copyright-paperwork-exempt: yes
Peter Feigl [Sun, 25 Jul 2021 07:16:08 +0000 (09:16 +0200)]
Add commands to move to next/previous column in tabulated-list-mode
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Add
keybindings M-left and M-right.
(tabulated-list-previous-column tabulated-list-next-column): Implement
commands (bug#44711).
Lars Ingebrigtsen [Sun, 25 Jul 2021 06:54:20 +0000 (08:54 +0200)]
Rename directory-append to file-name-concat
* src/fileio.c (Ffile_name_concat):
* lisp/files.el (move-file-to-trash):
* lisp/emacs-lisp/shortdoc.el (file-name):
* doc/lispref/files.texi (Directory Names): Rename
`directory-append' to `file-name-concat'.
Lars Ingebrigtsen [Sun, 25 Jul 2021 06:00:50 +0000 (08:00 +0200)]
Allow empty elements in directory-append
* doc/lispref/files.texi (Directory Names): Document it.
* src/fileio.c (Fdirectory_append): Allow empty elements.
Mattias Engdegård [Sat, 24 Jul 2021 15:11:21 +0000 (17:11 +0200)]
Disable delay and ding in replace-tests
* test/lisp/replace-tests.el (replace-tests-with-undo):
When testing the "U" (undo all changes) option, the code will delay
and ding which is obnoxious in an automated test.
Disabling that makes the test quiet and about 150 times faster.
Eli Zaretskii [Sat, 24 Jul 2021 17:18:28 +0000 (20:18 +0300)]
; * src/fileio.c (Fdirectory_append): Doc fix.
Yuan Fu [Sat, 24 Jul 2021 17:11:08 +0000 (19:11 +0200)]
Add filter to GDB's register buffer
* lisp/progmodes/gdb-mi.el (gdb-registers-enable-filter)
(gdb-registers-filter-pattern-list): New custom options.
(gdb-header-click-event-handler, gdb-registers-toggle-filter): New
functions.
(gdb-header-click-event-handler): Only add a register if it passes the
filter.
(gdb-registers-mode-map): New keybinding for toggling the filter.
(gdb-registers-header): New buttons on the header line for the
filter (bug#39179).
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:48:44 +0000 (18:48 +0200)]
Really convert to multibyte in Fdirectory_append
* src/fileio.c (Fdirectory_append): Fix check for whether we need
to convert to multibyte.
(Fdirectory_append):
Michael Albinus [Sat, 24 Jul 2021 16:49:57 +0000 (18:49 +0200)]
Fix last commit in tramp.el
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:35:14 +0000 (18:35 +0200)]
Fix Fdirectory_append check for whether strings have to be converted
* src/coding.c (string_ascii_p): Make it non-static.
* src/fileio.c (Fdirectory_append): Fix check for whether we need
to convert to multibyte.
* src/fns.c (string_ascii_p): Remove copy.
* src/lisp.h: Declare string_ascii_p.
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:21:50 +0000 (18:21 +0200)]
Set the normal-erase-is-backspace variable from Customize
* lisp/simple.el (normal-erase-is-backspace): Always set the
variable so that Customize is up-to-date (bug#49593).
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:09:14 +0000 (18:09 +0200)]
Tweak Fdirectory_append slightly
* src/fileio.c (Fdirectory_append): Make the xfree condition more
robust.
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:06:36 +0000 (18:06 +0200)]
Improve directory-append manual entry
* doc/lispref/files.texi (Directory Names): Mention zero-length
restriction.
Lars Ingebrigtsen [Sat, 24 Jul 2021 15:28:10 +0000 (17:28 +0200)]
Tweak Fdirectory_append for efficiency
* src/fileio.c (Fdirectory_append): Make slightly more efficient.
Lars Ingebrigtsen [Sat, 24 Jul 2021 15:22:43 +0000 (17:22 +0200)]
Extend directory-append to take an arbitrary number of components
* doc/lispref/files.texi (Directory Names): Document it.
* lisp/emacs-lisp/shortdoc.el (file-name): Add new example.
* src/fileio.c (Fdirectory_append): Change the function to take an
arbitrary number of components.
Basil L. Contovounesios [Sat, 24 Jul 2021 13:59:36 +0000 (14:59 +0100)]
; Fix directory-append arglist in files.texi.
Michael Albinus [Sat, 24 Jul 2021 11:58:23 +0000 (13:58 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 24 Jul 2021 11:58:03 +0000 (13:58 +0200)]
Add Tramp support for yubikey (bug#49714)
* lisp/net/tramp.el (tramp-yubikey-regexp): New defcustom.
(tramp-action-show-and-confirm-message): New defun.
* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band): Add `tramp-yubikey-regexp' action.
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:53:46 +0000 (13:53 +0200)]
Adjust tab-bar to the new mode-line-misc-info value
* lisp/tab-bar.el (tab-bar--define-keys): Adjust to the new
default value for `mode-line-misc-info'.
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:47:54 +0000 (13:47 +0200)]
Remove duplicated NEWS entries
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:46:02 +0000 (13:46 +0200)]
Make 's' in *Help* work for Lisp-defined variables again
* lisp/help-fns.el (describe-variable): Make the `s' command work
for Lisp-defined variables again (bug#39121).
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:34:52 +0000 (13:34 +0200)]
Fix problem when moving files called ~ to the trash
* lisp/files.el (move-file-to-trash): Construct the trash file
name safely (bug#49711). This makes (move-file-to-trash "/tmp/~")
etc work.
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:30:58 +0000 (13:30 +0200)]
Add new function `directory-append'
* doc/lispref/files.texi (Directory Names): Document it, and
remove the concat-based file concatenation description.
* lisp/emacs-lisp/shortdoc.el (file-name): Add. And add more
expand-file-name examples.
* src/fileio.c (Fdirectory_append): New function.
Eli Zaretskii [Sat, 24 Jul 2021 10:41:01 +0000 (13:41 +0300)]
; One more change in back.texi.
Eli Zaretskii [Sat, 24 Jul 2021 10:15:50 +0000 (13:15 +0300)]
; Yet another last-minute change in Emacs manual for printing
* doc/emacs/book-spine.texi:
* doc/emacs/back.texi: Minor copyedits.